package com.smart.common.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * @author macbook
 */
public enum ProjectEngineeringTypeEnum {
    /**
     *
     */
    COMMERCIAL_HOUSING("房建-商品房"),
    AFFORDABLE_HOUSING("房建-保障房"),
    PUBLIC_BUILDINGS("房建-公共建筑"),
    INDUSTRIAL_BUILDINGS("房建-工业厂房"),
    MUNICIPAL("市政"),
    DECORATION("装修"),
    HOUSE_ALTERATION("老旧小区改造");
    private String desc;

    ProjectEngineeringTypeEnum(String desc) {
        this.desc = desc;
    }

    /**
     * 是否是房建项目
     *
     * @param engineeringType
     * @return
     */
    public static boolean isHouseMultiplexProject(String engineeringType) {
        if (StringUtils.isEmpty(engineeringType)) {
            return false;
        }
        return COMMERCIAL_HOUSING.name().equals(engineeringType) ||
                AFFORDABLE_HOUSING.name().equals(engineeringType) ||
                PUBLIC_BUILDINGS.name().equals(engineeringType) ||
                INDUSTRIAL_BUILDINGS.name().equals(engineeringType);
    }

    /**
     * 是否是装修工程复工项（装修和老旧小区改造）
     *
     * @param engineeringType
     * @return
     */
    public static boolean isOldMultiplexCount(String engineeringType) {
        if (StringUtils.isEmpty(engineeringType)) {
            return false;
        }
        return DECORATION.name().equals(engineeringType) || HOUSE_ALTERATION.name().equals(engineeringType);
    }
}
